package com.dferreira.languagesteach.fragments;

import com.dferreira.languagesteach.data_adapters.LessonsAdapter;
import com.dferreira.languagesteach.fragments.generic.NavigationListFragment;

/**
 * Created by dferreira on 5/29/14.
 * for LanguagesTeach
 */
public class LessonsFragment extends NavigationListFragment {
    private LessonsAdapter lessonsAdapter;

    @Override
    public void onStart() {

        Boolean buildResult;

        super.onStart();

        lessonsAdapter = new LessonsAdapter(getActivity(), getFragmentStack(), getPackageFolder());
        buildResult = lessonsAdapter.buildDataSet();
        if (buildResult) {
            setListAdapter(lessonsAdapter);
        } else {
            getActivity().onBackPressed();
        }
    }
}
